import { _decorator, Component, Vec3 } from 'cc';
import { DataItemLayout } from '../../../Core/DataItemLayout';
const { ccclass, property } = _decorator;

/**
 * 248139929
 * Thu Mar 21 2024 21:10:26 GMT+0800 (中国标准时间)
 */

function getMinMax(min:number, max:number){
    return Math.floor(Math.random() * (max - min + 1)) + min;
}

@ccclass('TalentPanel')
export class TalentPanel extends Component {

    @property(DataItemLayout)
    layout:DataItemLayout

    protected onLoad(): void {
        let datas = []
        for (let i = 1; i < 1000; i++) {
            datas.push({name:`第${i}关`, hasBig:getMinMax(0, 100)})
        }
        datas[0].hasBig = 100

        this.layout.bindDatas(datas)
        
    }
}
